package com.fox0g.mapper;


import com.fox0g.pojo.Tstate;
import com.fox0g.pojo.Virus;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @author 86176
 * @description 针对表【virus(病毒含量)】的数据库操作Mapper
 * @createDate 2024-07-10 09:13:25
 * @Entity com.fox0g.pojo.Virus
 */

@Mapper
public interface VirusMapper extends BaseMapper<Virus> {
    @Insert("insert into test.virus(virusvolum,filterdata,create_time)" +
            " values (#{virusvolum},#{filterdata},#{createTime})")
    int insert(Virus virus);

    @Select("select virusvolum,filterdata,create_time from test.virus order by id desc ")
    List<Virus> virusAllData();

    @Select("select virusvolum from test.virus")
    List<String> allvirusvolum();

    @Update("update virus set filterdata = #{filterdata} where id = #{id}")
    void updateFilteredValue(@Param("id") int id, @Param("filterdata")String filterdata);

}







